<?php 	defined('_JEXEC') or die('Restricted access');	//九核模块，由【九木核心】开发制作：www.jmcore.com

	$n=2; //设置项名称中的最大编号，如有 v_100，则置：$n=100; 
	for ($i =0; $i <= $n; $i++)  $v[$i] = trim($params->get('v_'.$i));		//取得所有设置项的值

	if($v[0]) JFactory::getDocument()->addStyleDeclaration($v[0]); //添加补充样式，补充样式设置的名称固定为：name="v_0"
	$app = JFactory::getApplication();
	$t = $app->getTemplate(); //src="templates/$t/img/logo.gif"
	$p = jmcore::get_tpara();
	//for ($i = 0; $i < 55; $i++) { ${'p'.$i} = $p[$i]; }
	$logo		= $p[1];
	$eid_eng	= $p[23];
	$eid_us		= $p[24];
?>
<div class="m_<?php echo $mid.' '.$mnm; ?>">
	<div id="top">
		<ul>
			<li><a href="<?php echo JRoute::_('index.php?Itemid='.$eid_eng ,false) ; ?>">English</a></li>
			<li><a href="<?php echo JRoute::_('index.php?Itemid='.$eid_us ,false) ; ?>">联系我们</a></li>
			<li><a href="<?php echo JURI::root() ; ?>">返回首页</a></li>
		</ul>
	</div>

	<div id="banner" style="background-image:url('<?php echo $logo ; ?>');"></div>
	<div id="menu" class="bluetabs">
		<ul><?php
			$menu = $app->getMenu();
			$arr_item = $menu->getItems(array('menutype','level'),array('gsmenu',1));
			foreach($arr_item as $i=>$m){
				$nid = $m->id;
				$tit = $m->title;
				$lk = JRoute::_('index.php?Itemid='.$nid,false);
				$arr_item2 = $menu->getItems(array('parent_id','level'),array($nid,2));
				if(count($arr_item2)>0) $ref = ' rel="dropmenu'.$i.'_b" '; else $ref = ''; 
				echo '<li><a href="'.$lk.'" '. $ref .'>'.$tit.'</a></li> ';
			} ?>
		</ul>
	</div><?php
	foreach($arr_item as $i=>$m){
		$nid = $m->id;
		$arr_item2 = $menu->getItems(array('parent_id','level'),array($nid,2));
		if(count($arr_item2)>0){
			echo'<div id="dropmenu'.$i.'_b" class="dropmenudiv_b" style="width:100px;">';
			foreach($arr_item2 as $i2=>$m2){
				$nid2 = $m2->id;
				$tit2 = $m2->title;
				$lk2 = JRoute::_('index.php?Itemid='.$nid2,false);
				echo '<a href="'.$lk2.'">'.$tit2.'</a>';
			}
			echo'</div>';
		}
	}?> 
</div>

<script type="text/javascript"> 
	tabdropdown.init("menu");		//显示下拉子菜单
</script>
